//
//  CustomUISlider.m
//  UI04_Switch_Slider_SegmentedCintrol
//
//  Created by aaaaaa on 16/6/8.
//  Copyright © 2016年 dllo. All rights reserved.
//

#import "CustomUISlider.h"

@implementation CustomUISlider

/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/

- (instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        [self setProperty];
    }
    return self;
}

- (void)setProperty{
    
    //获取图片路径
    NSString *lowPath = [[NSBundle mainBundle] pathForResource:@"low" ofType:@"png"];
    //设置最小值图像
    self.minimumValueImage = [UIImage imageWithContentsOfFile:lowPath];
    
    NSString *heightPath = [[NSBundle mainBundle] pathForResource:@"hight" ofType:@"png"];
    //设置最大值图像
    self.maximumValueImage = [UIImage imageWithContentsOfFile:heightPath];
    
    //设置最小跟踪色
    self.minimumTrackTintColor = [UIColor orangeColor];
    //设置最大跟踪色
    self.maximumTrackTintColor = [UIColor greenColor];
    
    //设置最小值
    self.minimumValue = 2.0;
    //设置最大值
    self.maximumValue = 100.0;
    
}



@end
